<?php
include_once 'include/control/context.php.inc';
include_once 'include/model/Post.php';
include_once 'include/control/JobControl.php';

$control= new JobControl($current_usr);
$job = $control->job;

if(!$current_usr){
	header("Location: /oauth.php?s=go&url=/job/$job->id/edit");	
}

$title="编辑招聘信息";
$keywords ="编辑招聘信息";
$description = "编辑招聘信息";

include_once 'include/parts/header.php.inc';
?>

<div class="pt10 pb15">
<h1 class="blue">编辑招聘职位</h1>
</div>
<div>
<form action="/job_edit.php" method="post">
<input type="hidden" name="cmd" value="put" />
<input type="hidden" name="id" value="<?php echo $job-> id ;?>" />
<table width="100%" border="0" cellspacing="0" cellpadding="0"
	class="n_table">
	<tr>
		<th width="11%">标题：</th>
		<td width="89%"><input type="text" name="title" class="ntxt" value="<?php echo $job-> title; ?>" style="width: 200px" /></td>
	</tr>
	<tr>
		<th>内容：</th>
		<td><textarea name="body" cols="45" rows="15" class="textarea"><?php echo $job-> body ;?></textarea></td>
	</tr>
	<tr>
		<th>分类：</th>
		<td><?php
		echo '<select name="category_id">';
		foreach ($categories as &$c) {
			if($job-> category_id != $c->id){
				echo '<option value="'.
				$c -> id.'">'.
				$c -> screen_name.
		'</option>';
			}else{
				echo '<option value="'.
				$c -> id.'" selected="selected">'.
				$c -> screen_name.
		'</option>';
			}
		}
		echo '</select>';
		?></td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
		<p class="pt15"><input type="submit" class="orange_btn round_10"
			value="发布招聘信息" title="发布招聘信息" /></p>
		</td>
	</tr>
</table>
</form>
</div>
<div class="clear"></div>

		<?php
		include_once 'include/parts/footer.php.inc';
		?>
